
#ifndef _MEMBER_BCOMBOBOX_H_
#define _MEMBER_BCOMBOBOX_H_

#include <BRect>
#include <BArray>
#include <BIcon>
#include <BComboBox>
#include "IComboBoard.h"

#define combox_member(combox)		((member_BComboBox*)((BComboBox*)combox)->_ptr)

namespace BWE
{
	class ComboItem
	{
	public:
		ComboItem()
		{

		}
		BIconHolder	icon;
		BString		text;
		BValue		value;
		BRect		rect;
		BRect		iconRect;
		BSize		textSize;
		BRect		textRect;
	};
	class member_BComboBox
	{
	public:
		member_BComboBox(BComboBox* comboBox);
		~member_BComboBox();

		void freshRects();

		BComboBox*		boss;
		Align			align;
		int				space;
		BSize			iconSize;
		BIconHolder		arrowIcon;
		int				current;
		bool			dirty;

		State			arrowState;
		BRect			arrowRect;
		BPoint			arrowTriangle[3];
		BRect			iconRect;
		BRect			textRect;
		int				rowHeight;

		BArray<ComboItem>	items;
		BHolder<IComboBoard>	board;
	};
}

#endif